package other;

/**
 * @author ZhuQi
 * @ClassName OverLoading
 * @Date 2022/10/27 18:25
 * @Version 1.0
 * @Description 方法重载 涉及变量的类型转换。类型支持向上转换
 */
public class OverLoading {
    public static Object calc(String str){
        return str;
    }

    public static Object calc(double dt){
        return dt;
    }

    public static void main(String[] args) {
        int i = 10;
        System.out.println(calc(i));
    }
}
